1 00:00:00,200 --> 00:00:02,840 Let's continue with our battle info. 2 00:00:03,230 --> 00:00:07,070 So this is the local script that is on our screen. 3 00:00:07,070 --> 00:00:14,960 Guy telling us whether the battle is beginning or we're just preparing or we won, things like that. 4 00:00:14,960 --> 00:00:18,860 I wanted to break the two lessons up because they're getting kind of long. 5 00:00:18,860 --> 00:00:22,610 So let's go ahead and get started with our battle info. 6 00:00:22,610 --> 00:00:23,410 Luke. 7 00:00:24,170 --> 00:00:30,380 Let's get rid of this print statement and I'll get a variable for replicated storage because we've got 8 00:00:30,380 --> 00:00:32,060 to listen to that remote event. 9 00:00:32,210 --> 00:00:38,240 So we'll do gain get service, replicated storage, we'll put it in the SES variable. 10 00:00:38,750 --> 00:00:44,150 I'm also going to need a variable for my status remote event status RI. 11 00:00:44,630 --> 00:00:46,490 So it's in replicated storage. 12 00:00:46,490 --> 00:00:48,830 Wait for child status RI. 13 00:00:49,190 --> 00:00:53,090 Let's get a variable for the begin sound. 14 00:00:53,120 --> 00:00:56,450 Begin sound. 15 00:00:56,660 --> 00:00:58,940 And we'll say script dot parent. 16 00:01:00,080 --> 00:01:01,250 Was it announcements? 17 00:01:01,250 --> 00:01:02,150 Should we do a wait for child? 18 00:01:02,160 --> 00:01:04,550 Let's do a wait for child Wait for child. 19 00:01:05,990 --> 00:01:10,070 Announcer Begin to what else? 20 00:01:10,070 --> 00:01:12,730 Let's get a variable for our label. 21 00:01:12,740 --> 00:01:14,570 We're going to have to change the text on the label. 22 00:01:14,570 --> 00:01:16,210 We're going to have to make it visible too. 23 00:01:16,220 --> 00:01:24,810 So we have script dot parent and we do await for child wait for child info label. 24 00:01:24,810 --> 00:01:27,420 You could also just do parent.info label. 25 00:01:27,420 --> 00:01:28,680 That'll that'll work. 26 00:01:28,890 --> 00:01:29,400 All right. 27 00:01:29,400 --> 00:01:35,100 So the status RI is going to fire when something happens in the battle. 28 00:01:35,100 --> 00:01:43,440 So we'll do our status RI dot on client event Colon connect function. 29 00:01:43,440 --> 00:01:53,850 We'll get a status and I think I'm going to send a message over to I didn't do that for, for our beginner 30 00:01:53,880 --> 00:01:54,990 our battle manager. 31 00:01:54,990 --> 00:01:57,960 But we'll go back and we'll, we'll clean that up a little bit. 32 00:01:57,960 --> 00:02:06,060 So when we get something from the server side, from our battle manager, we're going to get the label, 33 00:02:06,060 --> 00:02:08,850 we're going to make sure it's visible, right? 34 00:02:08,850 --> 00:02:10,710 So we'll say visible equals true. 35 00:02:10,740 --> 00:02:19,450 Then let's check the status to see what kind of message it is so or remote event it is. 36 00:02:19,470 --> 00:02:26,970 So we'll say if status equals equals, I sent one for begin before. 37 00:02:26,970 --> 00:02:28,800 Let's do one for prepare. 38 00:02:28,830 --> 00:02:29,580 Also. 39 00:02:29,610 --> 00:02:31,890 That's the get ready for the battle. 40 00:02:31,890 --> 00:02:36,840 And in prepare we're going to get a message. 41 00:02:37,590 --> 00:02:38,940 This message right here. 42 00:02:38,940 --> 00:02:41,850 We're going to send it over and then we'll display it. 43 00:02:42,090 --> 00:02:44,250 I'm going to do two other conditions. 44 00:02:44,250 --> 00:02:45,600 We have our prepare. 45 00:02:45,600 --> 00:02:50,670 We're going to have we'll do a control C control V, We're going to have a begin. 46 00:02:50,670 --> 00:02:54,540 Right, begin. 47 00:02:54,540 --> 00:02:59,490 And then I'll do another paste down here and then we're going to have the winner. 48 00:02:59,880 --> 00:03:01,260 I'll just say win. 49 00:03:01,260 --> 00:03:06,990 So we have the text updating exactly the same on each if condition, so we don't really need it in the 50 00:03:07,020 --> 00:03:08,010 if condition. 51 00:03:08,010 --> 00:03:12,030 Let's do a control C, paste it outside of the F's. 52 00:03:12,120 --> 00:03:14,370 Things are going to change though, right? 53 00:03:14,370 --> 00:03:15,660 So prepare. 54 00:03:16,320 --> 00:03:18,000 Let's go ahead and get our sound. 55 00:03:18,000 --> 00:03:18,780 We have a. 56 00:03:19,500 --> 00:03:21,040 Not a begin sound. 57 00:03:21,060 --> 00:03:21,860 Let's just put a note. 58 00:03:21,870 --> 00:03:23,850 We're going to need another sound here. 59 00:03:24,180 --> 00:03:26,730 Sound for Countdown. 60 00:03:28,440 --> 00:03:35,640 And then here we're going to have the sound to begin that begin that begin announcement. 61 00:03:35,640 --> 00:03:39,420 So we'll get our begin Sound colon play. 62 00:03:39,840 --> 00:03:43,500 And then down here we're going to have our wind sound. 63 00:03:43,500 --> 00:03:46,350 Did we get a we don't have a variable for that. 64 00:03:46,350 --> 00:03:47,900 Born a winner. 65 00:03:47,910 --> 00:03:49,190 Let's make a variable. 66 00:03:49,200 --> 00:03:51,240 I'll put it right with the other sound. 67 00:03:51,270 --> 00:04:02,250 Do a local and wind sound equals script dot parent wait for child born a winner. 68 00:04:03,630 --> 00:04:04,300 There we go. 69 00:04:04,320 --> 00:04:05,130 Ctrl C. 70 00:04:06,620 --> 00:04:09,560 Control V, and we'll get to play. 71 00:04:10,640 --> 00:04:11,000 All right. 72 00:04:11,000 --> 00:04:13,670 So the only thing we don't have is for the countdown. 73 00:04:14,000 --> 00:04:16,430 Let's go get a sound for our countdown. 74 00:04:16,430 --> 00:04:23,270 I'm going to do, like, a beep every time a second rolls off, So I'm going to go to my battle royale, 75 00:04:23,480 --> 00:04:26,630 go to Toolbox and Under Marketplace. 76 00:04:26,630 --> 00:04:28,340 My audio is still open. 77 00:04:28,340 --> 00:04:30,650 I'm going to do a search on beep. 78 00:04:32,710 --> 00:04:34,570 And get something really short. 79 00:04:35,530 --> 00:04:37,330 So that's not bad. 80 00:04:39,300 --> 00:04:40,830 That's pretty good. 81 00:04:41,450 --> 00:04:43,070 There's one I liked more. 82 00:04:43,820 --> 00:04:44,900 I think I'll do a two tone. 83 00:04:44,900 --> 00:04:47,210 Like the bebop right here. 84 00:04:47,480 --> 00:04:50,750 Let's just select screen guy. 85 00:04:51,040 --> 00:04:51,680 Insert. 86 00:04:51,680 --> 00:04:53,600 We got our little bebop sound. 87 00:04:54,050 --> 00:04:55,160 Let's close this. 88 00:04:55,160 --> 00:05:03,380 Let's go back to our battle info, Loke, and then I'll call it a beep. 89 00:05:03,850 --> 00:05:11,660 Beep equals script dot parent wait for child and we got our bebop beep bop. 90 00:05:12,500 --> 00:05:13,400 Nice. 91 00:05:14,470 --> 00:05:16,200 I'll put that sound right here. 92 00:05:16,210 --> 00:05:18,820 So say beep. 93 00:05:20,450 --> 00:05:21,250 Oh, you know what that's called? 94 00:05:21,280 --> 00:05:22,630 Beep sound, right? 95 00:05:22,840 --> 00:05:24,280 Everything else is sound. 96 00:05:24,310 --> 00:05:25,840 Let's call it beep sound. 97 00:05:29,440 --> 00:05:34,210 Copy paste, colon play. 98 00:05:34,690 --> 00:05:35,170 All right. 99 00:05:35,200 --> 00:05:37,930 Now we're going to go to our. 100 00:05:38,850 --> 00:05:40,380 Battle manager. 101 00:05:41,900 --> 00:05:45,770 And in here before the battle begins. 102 00:05:47,970 --> 00:05:56,850 Actually, as the battle starts, instead of this printout, let's do our status, Ray, and then we'll 103 00:05:56,850 --> 00:05:57,590 do a fire. 104 00:05:57,630 --> 00:06:02,430 All clients, colon fire, all clients. 105 00:06:02,550 --> 00:06:09,020 And this is prepare and we'll send a message. 106 00:06:09,030 --> 00:06:12,660 The battle begins in something like that. 107 00:06:13,230 --> 00:06:14,580 Let's make it a string. 108 00:06:14,730 --> 00:06:16,050 Let's construct the string. 109 00:06:16,050 --> 00:06:19,230 We don't have a string yet because we're going to want that. 110 00:06:19,230 --> 00:06:38,280 I So I'll do a look str the battle begins in string concatenate our i string concatenate our seconds. 111 00:06:39,570 --> 00:06:45,420 I'll put a little space in here in between these because it's not like the print statements where when 112 00:06:45,420 --> 00:06:50,740 you use your comma, you get some, you get some space put in there by default. 113 00:06:50,740 --> 00:06:52,960 So that string will go in here. 114 00:06:52,960 --> 00:06:55,270 I don't think I'm going to start with or end with zero. 115 00:06:55,300 --> 00:06:58,150 I think I'm going to end with one that'll look better here. 116 00:06:59,070 --> 00:07:00,240 That looks pretty good. 117 00:07:00,240 --> 00:07:04,560 And then this begin right here. 118 00:07:06,330 --> 00:07:10,740 Let's go ahead and we can just put our our string in here. 119 00:07:10,740 --> 00:07:13,950 So begin battle. 120 00:07:19,610 --> 00:07:20,060 All right. 121 00:07:20,060 --> 00:07:20,930 And then there's a winner. 122 00:07:20,930 --> 00:07:24,320 But we haven't done the mechanics for last person standing yet. 123 00:07:24,740 --> 00:07:27,680 I think I'm going to add two more weight statements. 124 00:07:27,680 --> 00:07:32,480 So this bottle right here, it's going to fire off when the server starts up. 125 00:07:32,480 --> 00:07:32,690 Right. 126 00:07:32,690 --> 00:07:34,690 So we have this bottle being called once. 127 00:07:34,700 --> 00:07:41,000 Just be aware that since this is a reserved server, when everybody gets teleported over, this bottle 128 00:07:41,000 --> 00:07:43,730 will fire off because the server is starting up. 129 00:07:43,730 --> 00:07:47,120 But if you have some situation where the server is going to be running, you're going to have to call 130 00:07:47,120 --> 00:07:51,320 this bottle from one of these from something like a player added event. 131 00:07:51,320 --> 00:07:52,940 But we're fine like this. 132 00:07:52,940 --> 00:07:54,160 It should be fine. 133 00:07:54,170 --> 00:08:02,000 Let's go to the first line and just give a three second pause while that while that while people are 134 00:08:02,000 --> 00:08:07,280 being transported in this wait is good, it's one second. 135 00:08:07,310 --> 00:08:14,750 However, our last prepare, which will be one, is not going to show. 136 00:08:14,780 --> 00:08:19,610 It's going to be almost instant because we don't have any waits in here before we send our begin. 137 00:08:19,610 --> 00:08:20,990 So maybe. 138 00:08:22,040 --> 00:08:24,980 Yeah, maybe right here. 139 00:08:24,980 --> 00:08:33,830 Let's do a weight so that we can see that battle begins in one second before we start our begin battle. 140 00:08:34,220 --> 00:08:35,510 All right, let's give this a try. 141 00:08:35,510 --> 00:08:39,950 I'm going to go to my battle royale scene, and we have our label is still visible. 142 00:08:39,950 --> 00:08:45,710 Let's go to info label down on the screen Gooey and the starter gooey. 143 00:08:45,740 --> 00:08:46,880 Click on that. 144 00:08:46,880 --> 00:08:48,680 Make that invisible. 145 00:08:48,920 --> 00:08:49,790 There we go. 146 00:08:50,540 --> 00:08:53,390 Uncheck and we'll hit the play button. 147 00:08:53,720 --> 00:08:55,160 Test this out. 148 00:08:59,020 --> 00:08:59,560 All right. 149 00:08:59,560 --> 00:09:01,060 We're in the world. 150 00:09:06,490 --> 00:09:07,690 I think this is good. 151 00:09:07,720 --> 00:09:09,040 Let the games begin. 152 00:09:09,200 --> 00:09:10,740 And then we got our weapon. 153 00:09:10,780 --> 00:09:12,190 We had our announcement. 154 00:09:12,400 --> 00:09:13,480 I'm liking it. 155 00:09:13,480 --> 00:09:14,530 I'm liking it. 156 00:09:14,680 --> 00:09:15,220 All right. 157 00:09:15,220 --> 00:09:16,900 I will see you in the next video. 158 00:09:16,900 --> 00:09:18,580 We'll do the win scenario. 159 00:09:18,610 --> 00:09:20,140 The last person standing.